package com.ruoyi.project.lesson.tag.domain;

import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.TreeEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 课程标签对象 lesson_tag
 *
 * @author shixiangwen
 * @date 2020-12-07
 */
public class LessonTag extends TreeEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long id;

    /**
     * 标签名字
     */
    @Excel(name = "标签名字")
    private String name;

    /**
     * 父标ID
     */
    @Excel(name = "父标ID")
    private Long pid;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    private boolean flag;

    /**
     * 排序
     */
    @Excel(name = "排序")
    private String sort;

    private List<LessonTag> childrens;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public Long getPid() {
        return pid;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getSort() {
        return sort;
    }

    public List<LessonTag> getChildrens() {
        return childrens;
    }

    public void setChildrens(List<LessonTag> childrens) {
        this.childrens = childrens;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("pid", getPid())
                .append("createdTime", getCreatedTime())
                .append("sort", getSort())
                .toString();
    }
}
